Allow merging all libcore/alloc doctests into a single binary#153072
Allow merging all libcore/alloc doctests into a single binary#153072jyn514 wants to merge 6 commits intorust-lang:mainfrom
Conversation
|
rustbot has assigned @jdonszelmann. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
16227c8 to
d567da2
Compare
This comment has been minimized.
This comment has been minimized.
|
Merging doctest would mean that we did no longer test that the set of features in doc tests are accurate, right? Those are visible to the user. |
This comment has been minimized.
This comment has been minimized.
|
Yes. That’s why this doesn’t actually switch on merging, as mentioned in the description. |
d567da2 to
4254825
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
4254825 to
952fe7f
Compare
952fe7f to
b2229d2
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
This comment has been minimized.
This comment has been minimized.
|
... CI flake probably?
|
|
@rustbot ready |
|
@bors r+ rollup |
|
@bors rollup=iffy |
|
@bors r- |
|
let's just rerun PR CI quickly to make sure, r=me afterwards |
This comment has been minimized.
This comment has been minimized.
b2229d2 to
1c7a992
Compare
|
The job Click to see the possible cause of the failure (guessed by this bot) |
View all comments
This is only the changes needed to allow merging the tests. This doesn't actually turn doctest merging on in bootstrap. I think that might be a useful follow-up, since it makes them much faster to run, but it's not without downsides because it means we'll no longer be testing that doctests have all necessary
feature()attributes.The motivation for this change is to run the tests with
-C instrument-coverageand then generate a coverage report from the output. Currently, this is very expensive because it requires parsing DWARF for each doctest binary. Merging the binaries decreases the time taken from several hours to ~30 seconds.There are several parts to this change, most of which are independent and I'm happy to split out into other PRs.
-C panic=abort. Ferrocene needs this downstream for complicated reasons; it's a one-line change so I figured it's not a big deal.allow(incomplete_features)as a crate-level attribute, just likeinternal_features. Without this, it's possible to get hard errors if rustdoc lifts features to the crate level but notallows.--merge-doctests=yes. In particular, I removed a few$crateusages and explicitly marked a few doctests asstandalone_crate.